<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>

  <body>
    <div id="app"></div>

    <script type="module">
      import { createApp } from "./lib/vue3.esm.browser.js";

      const app = createApp({
        data() {
          return {
            msg: "Parent",
          };
        },

        template: `
          <MyButton>
            {{ msg }}  
          </MyButton>
          <hr />
          <MyButton></MyButton>
        `,
      });

      app.component("MyButton", {
        data() {
          return {
            msg: "Child",
          };
        },
        template: `
          <button>
            <slot>
              Submit  
            </slot>  
          </button>
        `,
      });

      app.mount("#app");
    </script>
  </body>
</html>
